package com.mxpio.erp.common.technology.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import com.mxpioframework.jpa.BaseEntity;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@IdClass(value = ItemPropKey.class)
@Table(name = "MB_ERP_INVENTORY_ITEM_PLAN_PROP")
@ApiModel(value="物料计划属性")
public class ItemPlanProp extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "PROP_TYPE_")
	@ApiModelProperty(value = "属性类别")
	@Dict(dicCode = "ERP_TECH_PROP_TYPE")
	private String propType;
	
	@Id
	@Column(name = "CODE_")
	@ApiModelProperty(value = "物料/物料组编码")
	private String code;
	
	@Column(name = "PLANER_")
	@ApiModelProperty(value = "计划员")
	private String planer;
	
	/*
	 * 1、最小-最大法
	 * 2、在订货点
	 * 3、供应商管理
	 */
	@Column(name = "INVENTORY_PLAN_MODE_")
	@ApiModelProperty(value = "库存计划法")
	@Dict(dicCode = "ERP_TECH_INVENTORY_PLAN_MODE")
	private String inventoryPlanMode;
	
	/*
	 * 1、MRP
	 * 2、MPS
	 */
	@Column(name = "PLAN_METHOD_")
	@ApiModelProperty(value = "计划方法")
	@Dict(dicCode = "ERP_TECH_PLAN_METHOD")
	private String planMethod;
	
	/*
	 * 1、推式：先发料后生产
	 * 2、装配拉式：装配件完工扣减
	 * 3、工序拉式：工序完工扣减（暂不支持）
	 * 4、供应方：物料倒冲扣减\MRP计划不考虑
	 * 5、大量式：物料倒冲扣减\MRP计划不考虑
	 */
	@Column(name = "FEEDING_MODE_")
	@ApiModelProperty(value = "供料方式")
	@Dict(dicCode = "ERP_TECH_FEEDING_MODE")
	private String feedingMode;
	
	/*
	 * 1、自制件
	 * 2、采购件
	 */
	@Column(name = "ITEM_SOURCE_")
	@ApiModelProperty(value = "物料来源")
	@Dict(dicCode = "ERP_TECH_ITEM_SOURCE")
	private String itemSource;
	
	@Column(name = "FIXED_PLAN_QUANTITY_")
	@ApiModelProperty(value = "固定订货量")
	private String fixedPlanQuantity;
	
	@Column(name = "FIXED_PLAN_DAYS_")
	@ApiModelProperty(value = "固定订货天数")
	private String fixedPlanDays;
	
	@Column(name = "FIXED_LOT_SIZE_")
	@ApiModelProperty(value = "固定批量")
	private String fixedLotSize;
	
}
